<#setting number_format=",###.###">
<#setting classic_compatible="true">
<style id="printStyle">

#printHead,#tableArea,#remark,#printFooter,#contractContent,#pageFooter{
    font-family: Times New Roman,DFPBiaoKaiShu-B5,KaiTi_GB2312,'楷体';
    font-size: 13px;
    line-height: 22px;
}
td,tr,talbe {
    margin: 0;
    padding: 0;
}

div{
    word-break:break-strict;
}

table {
    border-spacing: 0;
    border-spacing: 0 !important;
    *border-collapse: expression('separate', cellSpacing =   '0px');
    border-spacing: expression(this.cellSpacing = 0);
    table-layout:fixed; 
    word-break:break-strict; 
}

td,th {
    display: table-cell;
    vertical-align: inherit;
}

table th,table td {
    text-align: left;
    line-height: 25px;
}

.printTable {
    width: 100%;
    margin: 0;
    padding: 0;
}

.printTable td {
    line-height: 25px;
    word-wrap:break-word;
    word-break:break-all;
}

.printTable tr {
    width: 100%;
}
.printTable td{
    border: 1px solid gray;
    border-collapse:collapse;
}
.printLine td{
    text-align: center;
}
</style>
<div id="printHead"  style="width: 700px;">
    <div style="width: 180px;float: left;">
            <img alt="" src="${staticDomain}images/system/logo/${entity.company.logo}" width="180"/>
        </div>
    <div style="line-height: 30px; font-size:1.9em; font-weight: bolder; text-align: center;width: 360px;float: left;margin-top: 15px;">对账单</div>
    <div style="float: left;width: 700px;">
        <table border="0" cellspacing="0" cellpadding="0" width="98%" style="margin-top:15px;">
            <tbody> 
                <tr>
                    <td width="15%"></td>
                    <td width="35%"></td>
                    <td width="15%">From：</td>
                    <td width="35%"></td>
                </tr>
                <tr>
                    <td width="15%"></td>
                    <td width="35%"></td>
                    <td width="15%">电话：</td>
                    <td width="35%">${maker.userName }</td>
                </tr>
                <tr>
                    <td width="15%"></td>
                    <td width="35%"></td>
                    <td width="15%">邮箱：</td>
                    <td width="35%">${maker.email }</td>
                </tr>
                <tr>
                    <td width="15%">To：</td>
                    <td width="35%"></td>
                    <td width="15%">编号：</td>
                    <td width="35%">${entity.no}</td>
                </tr>
                <tr>
                    <td width="15%">名称：</td>
                    <td colspan="3">${entity.supplier.name }</td>
                </tr>
                <tr>
                    <td width="15%">地址：</td>
                    <td colspan="3">${entity.supplier.address }</td>
                </tr>
                <tr>
                    <td width="15%">电话：</td>
                    <td colspan="3">${entity.supplier.linkTelephone}</td>
                </tr>
                <tr>
                    <td width="15%">传真：</td>
                    <td colspan="3">${entity.supplier.fax}</td>
                </tr>
                <tr>
                    <td>采购合同编号：</td>
                    <td colspan="3">${purchaseNos}</td>
                </tr>
                <tr>
                    <td width="10%">付款方式：</td>
                    <td colspan="3">${entity.payment }</td>
                </tr>
                <tr>
                    <td>出货日期：</td>
                    <td><#if entity.sendDate??>${entity.sendDate?string("yyyy-MM-dd")}</#if></td>
                    <td>付款日期：</td>
                    <td><#if entity.payDate??>${entity.payDate?string("yyyy-MM-dd")}</#if></td>
                </tr>
            </tbody>
        </table>
    </div>
</div>
<div id="tableArea">
    <div style="float: left;width: 700px;">
        <table class="printTable" style="margin-top: 15px;">
            <caption style="text-align: left;">
                <div style="line-height: 30px;margin-bottom:5px" align="left">
                                                             货物资料:
                </div>
            </caption>
            <thead>
                <tr class="printLine">
                    <td width="15%">中文名称</td>
                    <td width="20%">英文名称</td>
                    <td width="20%">产品编号</td>
                    <td width="15%">数量</td>
                    <td width="10%">单价${currency}</td>
                    <td width="20%">金额${currency}</td>
                </tr>
            </thead>
            <tbody>
                <#list orderItems as item>
                <tr>
                    <td style="text-align: left;">&#160;${item.name }</td>
                    <td style="text-align: left;">&#160;${item.englishName }</td>
                    <td style="text-align: left;">&#160;${item.productNo }</td>
                    <td style="text-align: left;">&#160;${item.quantity }</td>
                    <td style="text-align: left;">&#160;${item.unitPrice}</td>
                    <td style="text-align: left;">&#160;${item.quantity * item.unitPrice}</td>
                </tr>
                </#list>
                <#list chargeItems1 as item>
                <tr>
                    <td style="text-align: left;">&#160;其它费用:</td>
                    <td style="text-align: left;" colspan="4">&#160;${item.reason }</td>
                    <td style="text-align: left;">&#160;${item.amount }</td>
                </tr>
                </#list>
                <tr>
                    <td style="text-align: left;">&#160;定金:</td>
                    <td style="text-align: left;" colspan="4">&#160;</td>
                    <td style="text-align: left;">&#160;${entity.earnest!}</td>
                </tr>
                <#list chargeItems2 as item>
                <tr>
                    <td style="text-align: left;">&#160;扣款:</td>
                    <td style="text-align: left;" colspan="4">&#160;${item.reason }</td>
                    <td style="text-align: left;">&#160;${item.amount }</td>
                </tr>
                </#list>
                <tr class="printLine">
                    <td colspan="5" style="width: 90%; text-align: right;"><font
                        style="font-size: large;">总计:</font></td>
                    <td style="text-align: left;">&#160;${currency}${entity.total!}</td>
                </tr>
            </tbody>
        </table>
    </div>
</div>
<div id="contractContent">
    <div style="float: left;width: 700px;">
      <div style="text-align: left;margin-top: 5px;">
            <div style="min-height: 50px;">
                                             备注：${entity.remark!}
            </div>
            <div style="margin: 10px 0 10px 20px">
                                    尊敬的合作商，收到对帐单后，请于3个工作日内登录我公司采购系统确认此对账单.
            </div>
            <div style="width: 100%;">
                  <table style="width: 100%;">
                      <tr>
                          <td width="13%"></td>
                          <td width="37%"></td>
                          <td width="13%">工厂确认</td>
                          <td width="37%"></td>
                      </tr>
                      <tr>
                          <td>制单人：</td>
                          <td>${maker.userName}</td>
                          <td>对账人：</td>
                          <td><#if comfirmer??>${comfirmer.userName!}</#if></td>
                      </tr>
                      <tr>
                          <td>制单日期：</td>
                          <td>${entity.generateDate?string("yyyy-MM-dd")}</td>
                          <td>确认日期：</td>
                          <td><#if entity.confirmDate??>${entity.confirmDate?string("yyyy-MM-dd")}</#if></td>
                      </tr>
                      <tr>
                          <td>审核：</td>
                          <td></td>
                          <td>审核：</td>
                          <td></td>
                      </tr>
                       <tr>
                          <td>签章：</td>
                          <td></td>
                          <td>签章：</td>
                          <td></td>
                      </tr>
                  </table>
            </div>
        </div>
    </div>
</div>